<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>Unicode::Casing - Perl extension to override system case changing functions - metacpan.org</title>
        <link rel="preload" as="fetch" href="https://metacpan.org/account/login_status" crossorigin="anonymous" />
        <link href="https://metacpan.org/_assets/b8ccceeed47a0652049703d99326a9cea4933443.css" rel="stylesheet" type="text/css">
        <script src="https://metacpan.org/_assets/6bfedafe2d7caa915b7d84f61b45936818e3242e.js" type="text/javascript" defer></script>
        <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of Unicode-Casing - MetaCPAN" href="https://metacpan.org/dist/Unicode-Casing/releases.rss" />
        <link rel="canonical" href="./Unicode::Casing.html" />
        <meta name="description" content="Perl extension to override system case changing functions" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
        <link rel="shortcut icon" href="https://metacpan.org/static/icons/favicon.ico">
        <link rel="apple-touch-icon" sizes="152x152" href="https://metacpan.org/static/icons/apple-touch-icon.png">
        <link rel="search" href="https://metacpan.org/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          (function(skey, ga_id){
            ga('create', ga_id, {
              siteSpeedSampleRate : 100,
              storage             : 'none',
              clientId            : localStorage.getItem(skey)
            });
            ga(function(tracker) {
              localStorage.setItem(skey, tracker.get('clientId'));
            });
            ga('send', 'pageview');
          })('ga:clientId', 'UA-27829474-1');
        </script>
<meta name="twitter:card"        content="summary" />
<meta name="twitter:url"         content="https://metacpan.org/pod/Unicode::Casing" />
<meta name="twitter:title"       content="Unicode::Casing" />
<meta name="twitter:description" content="Perl extension to override system case changing functions" />
<meta name="twitter:site"        content="metacpan" />
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="header-logo-large hidden-xs">
              <a href="https://metacpan.org/" tabindex="0">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#logo" />
                </svg>
              </a>
            </div>
            <div class="header-logo-icon visible-xs">
              <a href="https://metacpan.org/">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#dots" />
                </svg>
              </a>
            </div>
            <ul class="nav navbar-nav menu-items hidden-xs hidden-sm">
              <li><a href="https://metacpan.org/about">About</a></li>
              <li><a href="https://metacpan.org/about/sponsors">Sponsor</a></li>
              <li><a href="https://grep.metacpan.org/">grep::cpan</a></li>
              <li><a href="https://metacpan.org/recent">Recent</a></li>
              <li><a href="https://metacpan.org/about/faq">FAQ</a></li>
              <li><a href="https://metacpan.org/tools">Tools</a></li>
              <li><a href="https://fastapi.metacpan.org/">API</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <button type="button" class="searchbar-btn visible-xs visible-sm">
                    <i class="fa fa-search button-fa-icon"></i>
                </button>
                <form action="https://metacpan.org/search" class="searchbar-form visible-md visible-lg search-form form-horizontal">
                   <input type="hidden" name="size" id="metacpan_search-size" value="20">
                  <div class="form-group">
                      <div class="search-group">
                        <i class="fa fa-search"></i>
                        <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value="">
                      </div>
                  </div>
                </form>
                    <li class="icon-slidepanel visible-xs visible-sm">
                      <button data-toggle="slidepanel" data-target=".slidepanel">
                        <span class="button-fa-icon">
                          <i class="fa fa-bars slidepanel-open"></i>
                          <i class="fa fa-times slidepanel-close"></i>
                        </span>
                      </button>
                    </li>
                <form action="https://metacpan.org/account/logout" method="POST" id="metacpan-logout"></form>
                <li class="dropdown logged_in" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="https://metacpan.org/account/identities">Identities</a></li>
                        <li><a href="https://metacpan.org/account/profile">Profile</a></li>
                        <li><a href="https://metacpan.org/account/favorite/list">Favorites</a></li>
                        <li>
                            <a href="./Unicode::Casing.html#" type="button" onclick="$('#metacpan-logout').submit(); return false">
                              Logout
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_out" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="https://metacpan.org/login/github">
                                <i class="fab fa-github fa-fw"></i>
                                GitHub
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/twitter">
                                <i class="fab fa-twitter fa-fw"></i>
                                Twitter
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/google">
                                <i class="fab fa-google fa-fw"></i>
                                Google
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_placeholder">
                    <button>
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                    </button>
                </li>
            </ul>
        </nav>
        <div class="page-content ">
          <!--
          <div class="top-notify-banner">
            <i class="fas fa-info-circle"></i>
          </div>
          -->
          <nav class="sidebar">
            <div class="slidepanel">
              <ul class="nav-list ">
    <li class="nav-header no-margin-top">
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of Unicode-Casing was released.">
      <span class="relatize">04 Aug 2016 21:38:40 UTC</span>
    </li>
  <li>
    Distribution: <a href="https://metacpan.org/dist/Unicode-Casing">Unicode-Casing</a>
  </li>
  <li>
    Module version: 0.16
  </li>
  <li>
    <a data-keyboard-shortcut="g s" href="https://metacpan.org/dist/Unicode-Casing/source/lib/Unicode/Casing.pm">Source</a>
    (<a href="https://metacpan.org/dist/Unicode-Casing/source/lib/Unicode/Casing.pm?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g b" href="https://metacpan.org/dist/Unicode-Casing/source/lib/Unicode">Browse</a>
    (<a href="https://metacpan.org/dist/Unicode-Casing/source/lib/Unicode?raw=1">raw</a>)
  </li>
    <li>
      <a data-keyboard-shortcut="g c" href="https://metacpan.org/dist/Unicode-Casing/changes">Changes</a>
    </li>
    <li>
      <a class="nopopup" href="https://metacpan.org/dist/Unicode-Casing/contribute">How to Contribute</a>
    </li>
    <li>
        <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/khwilliamson/Unicode-Casing">Repository</a>
    </li>
    <li>
      <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://rt.cpan.org/Public/Dist/Display.html?Name=Unicode-Casing">Issues</a>
      (0)
    </li>
    <li>
      <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Unicode-Casing+0.16" title="Matrix">Testers</a>
        <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/U/Unicode-Casing.html?oncpan=1&amp;distmat=1&amp;version=0.16&amp;grade=2" style="color: #090">73</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/U/Unicode-Casing.html?oncpan=1&amp;distmat=1&amp;version=0.16&amp;grade=3" style="color: #900">0</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/U/Unicode-Casing.html?oncpan=1&amp;distmat=1&amp;version=0.16&amp;grade=4">0</a>)</span>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/KHW/Unicode-Casing-0.16">Kwalitee</a>
    </li>
    <li>
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Unicode-Casing who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
      Bus factor: 0
      </div>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpancover.com/latest/Unicode-Casing-0.16/index.html">73.64% Coverage </a>
    </li>
    <li>
      License: perl_5
    </li>
    <li>
      Perl: v5.10.0
    </li>
    <li class="nav-header">Activity</li>
    <li>
<div class="activity-graph">
    <img src="https://metacpan.org/dist/Unicode-Casing/activity.svg?res=month" />
    <div class="comment">24 month</div>
</div>
    </li>
    <li class="nav-header">Tools</li>
    <li>
      <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/K/KH/KHW/Unicode-Casing-0.16.tar.gz">
      Download (<span itemprop="fileSize">57.76KB</span>)</a>
    </li>
    <li>
      <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FKHW%2FUnicode-Casing-0.16%2Flib%2FUnicode%2FCasing.pm">
        MetaCPAN Explorer
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Unicode-Casing/permissions">
        Permissions
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Unicode-Casing/releases.rss">
        Subscribe to distribution
      </a>
    </li>
    <li>
      <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog">
        Install Instructions
      </button>
    </li>
    <li>
      <form action="https://metacpan.org/search">
        <input type="hidden" name="q" value="dist:Unicode-Casing">
        <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
      </form>
    </li>
    <li>
      <form action="https://grep.metacpan.org/search">
        <input type="hidden" name="qd" value="Unicode-Casing">
        <input type="hidden" name="source" value="metacpan">
        <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
     </form>
    </li>
    <li class="version-jump">
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Unicode/Casing.pm&#39;" class="form-control tool-bar-form">
  <option disabled selected>Jump to version</option>
<option
  disabled
  value="KHW/Unicode-Casing-0.16"
>0.16
  (KHW on 2016-08-04)</option>
<optgroup label="BackPAN">'
<option
  
  value="KHW/Unicode-Casing-0.15"
>0.15
  (KHW on 2014-08-20)</option>
<option
  
  value="KHW/Unicode-Casing-0.14"
>0.14
  (KHW on 2014-08-20)</option>
<option
  
  value="KHW/Unicode-Casing-0.13"
>0.13
  (KHW on 2014-08-18)</option>
<option
  
  value="KHW/Unicode-Casing-0.12"
>0.12
  (KHW on 2012-05-25)</option>
<option
  
  value="KHW/Unicode-Casing-0.11"
>0.11
  (KHW on 2012-05-24)</option>
<option
  
  value="KHW/Unicode-Casing-0.10"
>0.10
  (KHW on 2012-05-20)</option>
<option
  
  value="KHW/Unicode-Casing-0.10_05"
>0.10_05 DEV
  (KHW on 2012-05-18)</option>
<option
  
  value="KHW/Unicode-Casing-0.10_04"
>0.10_04 DEV
  (KHW on 2012-05-12)</option>
<option
  
  value="KHW/Unicode-Casing-10_01"
>10_01
  (KHW on 2012-05-09)</option>
<option
  
  value="BDFOY/Unicode-Casing-0.08"
>0.08
  (BDFOY on 2011-08-10)</option>
<option
  
  value="KHW/Unicode-Casing-0.07"
>0.07
  (KHW on 2011-04-12)</option>
<option
  
  value="KHW/Unicode-Casing-0.06"
>0.06
  (KHW on 2011-03-24)</option>
<option
  
  value="KHW/Unicode-Casing-0.05"
>0.05
  (KHW on 2011-03-24)</option>
<option
  
  value="KHW/Unicode-Casing-0.04"
>0.04
  (KHW on 2011-03-23)</option>
<option
  
  value="KHW/Unicode-Casing-0.03"
>0.03
  (KHW on 2011-03-23)</option>
<option
  
  value="KHW/Unicode-Casing-0.02"
>0.02
  (KHW on 2011-03-23)</option>
<option
  
  value="KHW/Unicode-Casing-0.01"
>0.01
  (KHW on 2011-03-23)</option>
</optgroup>
</select>
    </li>
    <li class="version-diff">
<select onchange="document.location.href='/release/KHW/Unicode-Casing-0.16/diff/' + encodeURIComponent(this.value) + '/lib/Unicode/Casing.pm'
" class="form-control tool-bar-form">
  <option disabled selected>Diff with version</option>
<option
  disabled
  value="KHW/Unicode-Casing-0.16"
>0.16
  (KHW on 2016-08-04)</option>
<optgroup label="BackPAN">'
<option
  
  value="KHW/Unicode-Casing-0.15"
>0.15
  (KHW on 2014-08-20)</option>
<option
  
  value="KHW/Unicode-Casing-0.14"
>0.14
  (KHW on 2014-08-20)</option>
<option
  
  value="KHW/Unicode-Casing-0.13"
>0.13
  (KHW on 2014-08-18)</option>
<option
  
  value="KHW/Unicode-Casing-0.12"
>0.12
  (KHW on 2012-05-25)</option>
<option
  
  value="KHW/Unicode-Casing-0.11"
>0.11
  (KHW on 2012-05-24)</option>
<option
  
  value="KHW/Unicode-Casing-0.10"
>0.10
  (KHW on 2012-05-20)</option>
<option
  
  value="KHW/Unicode-Casing-0.10_05"
>0.10_05 DEV
  (KHW on 2012-05-18)</option>
<option
  
  value="KHW/Unicode-Casing-0.10_04"
>0.10_04 DEV
  (KHW on 2012-05-12)</option>
<option
  
  value="KHW/Unicode-Casing-10_01"
>10_01
  (KHW on 2012-05-09)</option>
<option
  
  value="BDFOY/Unicode-Casing-0.08"
>0.08
  (BDFOY on 2011-08-10)</option>
<option
  
  value="KHW/Unicode-Casing-0.07"
>0.07
  (KHW on 2011-04-12)</option>
<option
  
  value="KHW/Unicode-Casing-0.06"
>0.06
  (KHW on 2011-03-24)</option>
<option
  
  value="KHW/Unicode-Casing-0.05"
>0.05
  (KHW on 2011-03-24)</option>
<option
  
  value="KHW/Unicode-Casing-0.04"
>0.04
  (KHW on 2011-03-23)</option>
<option
  
  value="KHW/Unicode-Casing-0.03"
>0.03
  (KHW on 2011-03-23)</option>
<option
  
  value="KHW/Unicode-Casing-0.02"
>0.02
  (KHW on 2011-03-23)</option>
<option
  
  value="KHW/Unicode-Casing-0.01"
>0.01
  (KHW on 2011-03-23)</option>
</optgroup>
</select>
    </li>

    <li>
<ul class="dependencies">
  <li class="nav-header">Dependencies</li>
  <li><a href="https://metacpan.org/pod/B::Hooks::OP::Check" title="B::Hooks::OP::Check" class="ellipsis">B::Hooks::OP::Check</a></li>
  <li><a href="https://metacpan.org/pod/B::Hooks::OP::PPAddr" title="B::Hooks::OP::PPAddr" class="ellipsis">B::Hooks::OP::PPAddr</a></li>
  <li><a href="https://metacpan.org/pod/Test::More" title="Test::More" class="ellipsis">Test::More</a></li>
  <li><a href="https://metacpan.org/pod/XSLoader" title="XSLoader" class="ellipsis">XSLoader</a></li>
  <li>
    <hr>
  </li>
  <li>
    <a href="https://metacpan.org/module/Unicode::Casing/requires">Reverse dependencies</a>
  </li>
  <li>
    <a href="http://deps.cpantesters.org/?module=Unicode%3A%3ACasing">CPAN Testers List</a>
  </li>
  <li>
    <a href="https://cpandeps.grinnz.com/?dist=Unicode-Casing">Dependency graph</a>
  </li>
</ul>
    </li>
    <li class="nav-header">Permalinks</li>
    <li>
      <a href="https://metacpan.org/release/KHW/Unicode-Casing-0.16/view/lib/Unicode/Casing.pm">This version</a>
    </li>
    <li>
      <a href="./Unicode::Casing.html">Latest version</a>
    </li>
    <li>
<div class="plussers">
<div class="nav-header">++ed by:</div>
<div>
<a class="display-all" href="https://metacpan.org/author/PATCH"><img src="https://www.gravatar.com/avatar/3cab2cdaf129f5574e20c2b168b4c389?d=identicon&amp;s=20" title="PATCH" alt="PATCH"></a>
</div>
<!-- Display counts of plussers-->
<div>
    <a href="https://metacpan.org/dist/Unicode-Casing/plussers">1 PAUSE user</a>
</div>
<div>
    1 non-PAUSE user
</div>
</div>
    </li>
    <li>
    </li>
              </ul>
            </div>
          </nav>
          <div class="content-navigation">
<div class="breadcrumbs">
  <span>
    <a data-keyboard-shortcut="g a" rel="author" href="https://metacpan.org/author/KHW" class="author-name">Karl Williamson</a>
  </span>
  <span>&nbsp;/&nbsp;</span>
  <div class="release dist-release status-latest maturity-released">
    <span class="dropdown"><b class="caret"></b></span>
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Unicode/Casing.pm&#39;" class="">
<option
  selected
  value="KHW/Unicode-Casing-0.16"
>0.16
  (KHW on 2016-08-04)</option>
<optgroup label="BackPAN">'
<option
  
  value="KHW/Unicode-Casing-0.15"
>0.15
  (KHW on 2014-08-20)</option>
<option
  
  value="KHW/Unicode-Casing-0.14"
>0.14
  (KHW on 2014-08-20)</option>
<option
  
  value="KHW/Unicode-Casing-0.13"
>0.13
  (KHW on 2014-08-18)</option>
<option
  
  value="KHW/Unicode-Casing-0.12"
>0.12
  (KHW on 2012-05-25)</option>
<option
  
  value="KHW/Unicode-Casing-0.11"
>0.11
  (KHW on 2012-05-24)</option>
<option
  
  value="KHW/Unicode-Casing-0.10"
>0.10
  (KHW on 2012-05-20)</option>
<option
  
  value="KHW/Unicode-Casing-0.10_05"
>0.10_05 DEV
  (KHW on 2012-05-18)</option>
<option
  
  value="KHW/Unicode-Casing-0.10_04"
>0.10_04 DEV
  (KHW on 2012-05-12)</option>
<option
  
  value="KHW/Unicode-Casing-10_01"
>10_01
  (KHW on 2012-05-09)</option>
<option
  
  value="BDFOY/Unicode-Casing-0.08"
>0.08
  (BDFOY on 2011-08-10)</option>
<option
  
  value="KHW/Unicode-Casing-0.07"
>0.07
  (KHW on 2011-04-12)</option>
<option
  
  value="KHW/Unicode-Casing-0.06"
>0.06
  (KHW on 2011-03-24)</option>
<option
  
  value="KHW/Unicode-Casing-0.05"
>0.05
  (KHW on 2011-03-24)</option>
<option
  
  value="KHW/Unicode-Casing-0.04"
>0.04
  (KHW on 2011-03-23)</option>
<option
  
  value="KHW/Unicode-Casing-0.03"
>0.03
  (KHW on 2011-03-23)</option>
<option
  
  value="KHW/Unicode-Casing-0.02"
>0.02
  (KHW on 2011-03-23)</option>
<option
  
  value="KHW/Unicode-Casing-0.01"
>0.01
  (KHW on 2011-03-23)</option>
</optgroup>
</select>
    <a data-keyboard-shortcut="g d" class="release-name" href="https://metacpan.org/dist/Unicode-Casing">Unicode-Casing-0.16</a>
  </div>
<span class="river-gauge-gauge">
  <svg width="24px"
       height="15px"
       version="1.1"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">

    <g>
      <title>        River stage one &#10;
          • 2 direct dependents &#10;          • 2 total dependents
      </title>

      <rect x="0"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="5"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="10"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="15"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="20"  y="0" width="4" height="15" fill="#e4e2e2" />
    </g>
  </svg>

</span>
<div id="Unicode-Casing-fav" class="logged_in">
<form action="https://metacpan.org/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
    <input type="hidden" name="remove" value="0">
    <input type="hidden" name="release" value="Unicode-Casing-0.16">
    <input type="hidden" name="author" value="KHW">
    <input type="hidden" name="distribution" value="Unicode-Casing">
    <button type="submit" class="favorite highlight"><span>2</span> ++</button>
</form>
</div>
<div class="logged_out">
<a href="./Unicode::Casing.html" onclick="alert('Please sign in to add favorites'); return false" class="favorite highlight">
<span>2</span> ++</a>
</div>
   / <span>Unicode::Casing</span>
</div>
          </div>
          <main class="content">


<nav class="toc">
  <div class="toc-header"><strong>Contents</strong></div>
<ul>
  <li><a href="./Unicode::Casing.html#NAME">NAME</a></li>
  <li><a href="./Unicode::Casing.html#SYNOPSIS">SYNOPSIS</a></li>
  <li><a href="./Unicode::Casing.html#DESCRIPTION">DESCRIPTION</a></li>
  <li><a href="./Unicode::Casing.html#BUGS">BUGS</a></li>
  <li><a href="./Unicode::Casing.html#AUTHOR">AUTHOR</a></li>
  <li><a href="./Unicode::Casing.html#COPYRIGHT-AND-LICENSE">COPYRIGHT AND LICENSE</a></li>
</ul></nav>
<div class="pod anchors">
<h1 id="NAME">NAME</h1>

<p>Unicode::Casing - Perl extension to override system case changing functions</p>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<pre><code>  use Unicode::Casing
            uc =&gt; \&amp;my_uc, lc =&gt; \&amp;my_lc,
            ucfirst =&gt; \&amp;my_ucfirst, lcfirst =&gt; \&amp;my_lcfirst,
            fc =&gt; \&amp;my_fc;
  no Unicode::Casing;

  package foo::bar;
    use Unicode::Casing -load;
    sub import {
        Unicode::Casing-&gt;import(
            uc      =&gt; \&amp;_uc,
            lc      =&gt; \&amp;_lc,
            ucfirst =&gt; \&amp;_ucfirst,
            lcfirst =&gt; \&amp;_lcfirst,
            fc =&gt; \&amp;_fc,
        );
    }
    sub unimport {
        Unicode::Casing-&gt;unimport;
    }</code></pre>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>This module allows overriding the system-defined character case changing operations. Any time something in its lexical scope would ordinarily call <code>lc()</code>, <code>lcfirst()</code>, <code>uc()</code>, <code>ucfirst()</code>, or <code>fc()</code>, the corresponding user-specified function will instead be called. This applies to direct calls (even those prefaced by <code>CORE::</code>), and indirect calls via the <code>\L</code>, <code>\l</code>, <code>\U</code>, <code>\u</code>, and <code>\F</code> escapes in double-quoted strings and regular expressions.</p>

<p>Each function is passed a string whose case is to be changed, and should return the case-changed version of that string. Within the function&#39;s dynamic scope, references to the operation it is overriding use the non-overridden version. For example:</p>

<pre><code> sub my_uc {
    my $string = shift;
    print &quot;Debugging information\n&quot;;
    return uc($string);
 }
 use Unicode::Casing uc =&gt; \&amp;my_uc;
 uc($foo);</code></pre>

<p>gives the standard upper-casing behavior, but prints &quot;Debugging information&quot; first. This also applies to the escapes. Using, for example, <code>\U</code> inside the override function for <code>uc()</code> will call the non-overridden <code>uc()</code>. Since this applies across the dynamic scope, if <code>my_uc</code> calls function <code>a</code> which calls <code>b</code> which calls <code>c</code> which calls <code>uc</code>, that <code>uc</code> is the non-overridden version. Otherwise there would be the possibility of infinite recursion. And, it fits with the typical use of these functions, which is to use the standard case change except for a few select characters, as shown in the example below.</p>

<p>It is an error to not specify at least one override in the &quot;use&quot; statement. Ones not specified use the standard operation. It is also an error to specify more than one override for the same function.</p>

<p><code>use re &#39;eval&#39;</code> is not needed to have the inline case-changing sequences work in regular expressions.</p>

<p>Here&#39;s an example of a real-life application, for Turkish, that shows context-sensitive case-changing. (Because of bugs in earlier Perls, version v5.12 is required for this example to work properly.)</p>

<pre><code> sub turkish_lc($) {
    my $string = shift;

    # Unless an I is before a dot_above, it turns into a dotless i (the
    # dot above being attached to the I, without an intervening other
    # Above mark; an intervening non-mark (ccc=0) would mean that the
    # dot above would be attached to that character and not the I)
    $string =~ s/I (?! [^\p{ccc=0}\p{ccc=Above}]* \x{0307} )/\x{131}/gx;

    # But when the I is followed by a dot_above, remove the dot_above so
    # the end result will be i.
    $string =~ s/I ([^\p{ccc=0}\p{ccc=Above}]* ) \x{0307}/i$1/gx;

    $string =~ s/\x{130}/i/g;

    return lc($string);
 }</code></pre>

<p>A potential problem with context-dependent case changing is that the routine may be passed insufficient context, especially with the in-line escapes like <code>\L</code>.</p>

<p><i>90turkish.t</i>, which comes with the distribution includes a full implementation of all the Turkish casing rules.</p>

<p>Note that there are problems with the standard case changing operation for characters whose code points are between 128 and 255. To get the correct Unicode behavior, the strings must be encoded in utf8 (which the override functions can force) or calls to the operations must be within the scope of <code>use feature &#39;unicode_strings&#39;</code> (which is available starting in Perl version 5.12).</p>

<p>Also, note that <code>fc()</code> and <code>\F</code> are available only in Perls starting with version v5.15.8. Trying to override them on earlier versions will result in a fatal error.</p>

<p>Note that there can be problems installing this (at least on Windows) if using an old version of ExtUtils::Depends. To get around this follow these steps:</p>

<ol>

<li><p>upgrade ExtUtils::Depends</p>

</li>
<li><p>force install B::Hooks::OP::Check</p>

</li>
<li><p>force install B::Hooks::OP::PPAddr</p>

</li>
</ol>

<p>See <a href="http://perlmonks.org/?node_id=797851">http://perlmonks.org/?node_id=797851</a>.</p>

<h1 id="BUGS">BUGS</h1>

<p>This module doesn&#39;t play well when there are other attempts to override the functions, such as <code>use subs qw(uc lc ...);</code> or <span style="white-space: nowrap;"><code>*CORE::GLOBAL::uc = sub { .... };</code></span>. Which thing gets called depends on the ordering of the calls, and scoping rules break down.</p>

<h1 id="AUTHOR">AUTHOR</h1>

<p>Karl Williamson, <code>&lt;khw@cpan.org&gt;</code>, with advice and guidance from various Perl 5 porters, including Paul Evans, Burak G&uuml;rsoy, Florian Ragwitz, Ricardo Signes, and Matt S. Trout.</p>

<h1 id="COPYRIGHT-AND-LICENSE"><a id="COPYRIGHT"></a>COPYRIGHT AND LICENSE</h1>

<p>Copyright (C) 2011 by Karl Williamson</p>

<p>This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.</p></div>

<div id="metacpan_install-instructions-dialog" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Module Install Instructions</h4>
      </div>
      <div class="modal-body">
        <p>To install Unicode::Casing, copy and paste the appropriate command in to your terminal.</p>
        <p><a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p>
        <pre><code>cpanm Unicode::Casing</code></pre>
        <p><a href="https://metacpan.org/pod/CPAN">CPAN shell</a></p>
        <pre><code>perl -MCPAN -e shell
install Unicode::Casing</code></pre>
        <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p>
      </div>
      <div class="modal-footer">
        <a href="./Unicode::Casing.html#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>
          </main>
          <div class="content-pagination">
          </div>
        </div>
        <footer class="footer">
          <div class="footer-container">
            <div class="footer-social">
              <div class="footer-link footer-logo">
                <a href="https://metacpan.org/">
                  <img src="https://metacpan.org/static/images/metacpan-logo.svg" alt="MetaCPAN" />
                </a>
              </div>
              <a class="footer-social-link" href="https://github.com/metacpan">
                <i class="fab fa-github-square"></i>
              </a>
              <a class="footer-social-link" href="https://fosstodon.org/@metacpan">
                <i class="fab fa-mastodon"></i>
              </a>
            </div>
            <div class="footer-links">
              <div class="footer-link">
                  <a href="https://metacpan.org/about">About</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/sponsors">Sponsor</a>
              </div>
              <div class="footer-link">
                  <a href="https://grep.metacpan.org">grep::cpan</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/recent">Recent</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/faq">FAQ</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/tools">Tools</a>
              </div>
              <div class="footer-link">
                  <a href="https://fastapi.metacpan.org/">API</a>
              </div>
              <div class="footer-link">
                  <a href="https://www.perl.org/">Perl.org</a>
              </div>
            </div>
            <div class="footer-sponsors">
              <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener">
                <img class="footer-sponsor-bytemark" src="https://metacpan.org/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener">
                <img class="footer-sponsor-liquidweb" src="https://metacpan.org/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener">
                <img class="footer-sponsor-deriv" src="https://metacpan.org/static/images/sponsors/deriv.svg" alt="Deriv logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener">
                <img class="footer-sponsor-geocode" src="https://metacpan.org/static/images/sponsors/geocodelogo.svg" alt="Geocode logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener">
                <img class="footer-sponsor-fastly" src="https://metacpan.org/static/images/sponsors/fastly_logo.svg" alt="Fastly logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener">
                <img class="footer-sponsor-opencage" src="https://metacpan.org/static/images/sponsors/open-cage.svg" alt="OpenCage logo">
              </a>
            </div>
          </div>
        </footer>
        <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Keyboard Shortcuts</h4>
              </div>
              <div class="modal-body row">
<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Global</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>s</kbd>
        </td>
        <td>Focus search bar</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>?</kbd>
        </td>
        <td>Bring up this help dialog</td>
      </tr>
    </tbody>
  </table>

  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>GitHub</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>p</kbd>
        </td>
        <td>Go to pull requests</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>go to github issues (only if github is preferred repository)</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>POD</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>a</kbd>
        </td>
        <td>Go to author</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>c</kbd>
        </td>
        <td>Go to changes</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>Go to issues</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>d</kbd>
        </td>
        <td>Go to dist</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>r</kbd>
        </td>
        <td>Go to repository/SCM</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>s</kbd>
        </td>
        <td>Go to source</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>b</kbd>
        </td>
        <td>Go to file browse</td>
      </tr>

    </tbody>
  </table>
</div>

<div class="col-md-12">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Search terms</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>module:</em> (e.g. <a href="https://metacpan.org/search?q=module%3APlugin">module:Plugin</a>)</td>
      </tr>
      <tr>
        <td><em>distribution:</em> (e.g. <a href="https://metacpan.org/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td>
      </tr>
      <tr>
        <td><em>author:</em> (e.g. <a href="https://metacpan.org/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td>
      </tr>
      <tr>
        <td><em>version:</em> (e.g. <a href="https://metacpan.org/search?q=version%3A1.00">version:1.00</a>)</td>
      </tr>
    </tbody>
  </table>
</div>
              </div>
              <div class="modal-footer"></div>
            </div>
          </div>
        </div>
    </body>
</html>
